package customer.zspt.cn.customer.utils;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by Administrator on 2018/7/22 0022.
 */

public class ChatRecordSPUtils {
    //存储聊天记录
    public static void setRecordString(Context context, String SpName, String Key, String KeyValue){
        SharedPreferences SP = context.getSharedPreferences(SpName, Context.MODE_PRIVATE);
        SP.edit().putString(Key,KeyValue).commit();
    }
    //读取聊天记录
    public static String getRecordString(Context context,String SpName,String Key,String DefaultValue)
    {
        SharedPreferences SP = context.getSharedPreferences(SpName,Context.MODE_PRIVATE);
         return SP.getString(Key,DefaultValue);
    }

}
